/**
 * @param {number[]} nums
 * @param {number} target
 * @return {number[]}
 */
var twoSum = function(nums, target) {
  var first = 0;
  var sec = 0;
  var fIndex = 0
  var sIndex =0

  for(var i=0; i<nums.length;i++){
    first = nums[i];
     for(var j=i+1;j<nums.length;j++){
        sec = nums[j]
        if(first+sec == target){
          fIndex=i;
          sIndex=j
        }
     }
  }
  return [fIndex,sIndex]
    
};

var numbers = [2,7,11,15]

const result = twoSum(numbers,26);

console.log('result',result)

